/**
 * 文件、图片上传
 */
import { ROAST_CONFIG } from '@/config.js'
import store from '@/store.js'

export function uploadImage(data){
   return axios.post(ROAST_CONFIG.API_URL+'/image-upload',data,{
       headers: {
         'Content-Type': 'multipart/form-data',
         'Authorization': store.getters.getSessionId
      }
   });
}

export function uploadFile(data,url){
  return axios.post(ROAST_CONFIG.API_URL+url,data,{
      headers: {
        'Content-Type': 'multipart/form-data',
        'Authorization': store.getters.getSessionId
     }
  });
}

export function uploadVideo(data){
  return axios.post(ROAST_CONFIG.API_URL+'/video-upload',data,{
      headers: {
        'Content-Type': 'multipart/form-data',
        'Authorization': store.getters.getSessionId
     }
  });
}
